import http from "../utils/http/service";
// 查询字典
export const postDictList = (data): Promise<any> => {
  return http.post("/snow-admin/sysDict/dictList", data);
};

/**
 * 查询头部信息
 * @param {number} projectManageId
 */
export const getThdProjectSurcharge = (projectManageId): Promise<any> => {
  return http.get(`/snow-admin/thdProjectSurcharge/top/${projectManageId}`);
};
/**
 * 查询列表信息
 * @param {Object} data
 */
export const getThdProjectSurchargeList = (data): Promise<any> => {
  return http.post("/snow-admin/thdProjectSurcharge/list", data);
};

/**
 * 新增数据
 * @param {Object} data
 */
export const addData = (data): Promise<any> => {
  return http.post("/snow-admin/thdProjectSurcharge/add", data);
};

/**
 * 修改数据
 * @param {Object} data
 */
export const updateData = (data): Promise<any> => {
  return http.post("/snow-admin/thdProjectSurcharge/update", data);
};

/**
 * 删除数据
 * @param {string} id
 */
export const deleteData = (id): Promise<any> => {
  return http.post(`/snow-admin/thdProjectSurcharge/delete/${id}`);
};

/**
 * 导入
 * @param {number} projectManageId
 * @param {Object} data
 */
export const importData = (projectManageId, data): Promise<any> => {
  return http.post(
    `/snow-admin//thdProjectSurcharge/import?projectManageId=${projectManageId}`,
    data
  );
};
